//
//  WeekAxisValueFormatter.m
//  JunZeWristband
//
//  Created by Kendama on 2017/9/24.
//  Copyright © 2017年 DT. All rights reserved.
//

#import "WeekAxisValueFormatter.h"

@implementation WeekAxisValueFormatter
{
    NSArray *months;
    __weak BarLineChartViewBase *_chart;
}

- (id)initForChart:(BarLineChartViewBase *)chart
{
    self = [super init];
    if (self)
    {
        self->_chart = chart;
        
        months = @[
                   @"Jan", @"Feb", @"Mar",
                   @"Apr", @"May", @"Jun",
                   @"Jul", @"Aug", @"Sep",
                   @"Oct", @"Nov", @"Dec"
                   ];
    }
    return self;
}

- (NSString *)stringForValue:(double)value
                        axis:(ChartAxisBase *)axis
{
    
    switch ((int)value) {
        case 0:
            return MyNSLocalizedString(@"周一");
            break;
        case 1:
            return MyNSLocalizedString(@"周二");
            break;
        case 2:
            return MyNSLocalizedString(@"周三");
            break;
        case 3:
            return MyNSLocalizedString(@"周四");
            break;
        case 4:
            return MyNSLocalizedString(@"周五");
            break;
        case 5:
            return MyNSLocalizedString(@"周六");
            break;
        case 6:
            return MyNSLocalizedString(@"周日");
            break;
            
        default:
            return @"";
            break;
    }

}


@end
